package com.silence.gmall.config.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @Author silence
 * @Date 2025-10-30 01:50
 * @Email 792245022@qq.com
 * @Version 1.0
 * @Description 线程池配置
 */
@Data
@Component
@EnableConfigurationProperties(ThreadPoolProperties.class)
@ConfigurationProperties(prefix = "gmall.thread-pool")
public class ThreadPoolProperties {

    /**
     * 核心线程数
     */
    private int corePoolSize = 10;

    /**
     * 最大线程数
     */
    private int maximumPoolSize = 20;

    /**
     * 线程空闲时间
     */
    private long keepAliveTime = 1000L * 60 * 5;

    /**
     * 线程队列大小
     */
    private int workQueueSize = 1000;

}
